﻿<UserControl x:Class="SBPweb.Presentation.CompleteMesh.Controls.ViewPort"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:SBPweb.Presentation.CompleteMesh.Primitives"
    Width="800"
    Height="600">
    <Grid
        x:Name="gridMain"
        VerticalAlignment="Stretch" 
        HorizontalAlignment="Stretch">

        <Viewport3D Name="vpMain"
                        Grid.Column="1"
                        Grid.Row="1" 
                        VerticalAlignment="Stretch" 
                        HorizontalAlignment="Stretch"
                        AllowDrop="True"
                        Focusable="True"
                        Cursor="Hand">

            <Viewport3D.Camera>

                <PerspectiveCamera
                        x:Name="camMain"
                        Position="0 30 -100" 
                        LookDirection="0 -30 100" 
                        UpDirection="0 1 0"
                        FieldOfView="90"
                    />

            </Viewport3D.Camera>

            <ModelVisual3D>
            
                <ModelVisual3D.Children>
                                        
                    <ModelVisual3D
                        x:Name="mv3dMain">
                        
                        <!--local:Sphere3D Radius="40">
                            <ModelVisual3D.Transform>
                                <TranslateTransform3D OffsetX="0" OffsetY="20" OffsetZ="20" />
                            </ModelVisual3D.Transform>
                        </local:Sphere3D-->
                        
                    </ModelVisual3D>
                                        
                </ModelVisual3D.Children>

                <ModelVisual3D.Content>

                    <Model3DGroup
                        x:Name="m3dgMain">

                        <AmbientLight
                            x:Name="alightMain"
                            Color="#808080" />

                    </Model3DGroup>

                </ModelVisual3D.Content>

            </ModelVisual3D>

        </Viewport3D>
        
        <Rectangle
            x:Name="rectMain"
            Opacity="0"
            Stroke="{x:Null}"
            Fill="#FFFFFFFF"
            Width="Auto"
            Height="Auto"
            Grid.RowSpan="1"/>

    </Grid>
</UserControl>
